<%@include file="top.jsp"%>
<jsp:useBean id="user" class="mvc.User" scope="session" />
<%

String username = user.getUsername();

if(username.equals(""))
	out.println("You have to log in and to see this page!<br><a href=\"/mvcjsp/login.jsp\">To Login Page</a>");
else{
	out.println("Logged in as " + username + "<br><a href=\"/servlet/mvc.Servl?state=logout\">Logout</a>");

if(request.getAttribute("errorMessage")!=null)
out.println(request.getAttribute("errorMessage"));%>

<jsp:useBean id="profile" type="mvc.Profile" scope="session" />
<center>
<table width="560" border="0">
	<tr>
      	<td width="120"><a href="<%=profile.getPhoto()%>"><img src="<%=profile.getPhoto()%>" width="120" height="200" border="1"></a></td>
    	<td width="440" align="left" valign="top"><h3><%=profile.getName()%></h3><br>
  		<b>Mail:</b> <%=profile.getEmail()%><br>
		<b>Mobile nr:</b> <%=profile.getMobilenr()%><br>
		<b>Website:</b> <a href="<%=profile.getWebsite()%>" target="_blank"><%=profile.getWebsite()%></a><br>
</td>
	</tr>
</table><br>
<table width="560" border="0">
	<tr>
      	<td>
<%=profile.getProfiletext()%>
      	</td>
	</tr>
</table>
<%}%>
<c/center>
<%@include file="bottom.jsp"%>